import request from '@/utils/request'

/**
 * 查询操作日志列表
 * @param {Object} query - 查询参数对象
 * @returns {Promise} 返回操作日志列表数据的Promise对象
 */
export function list(query) {
  return request({
    url: '/monitor/operlog/list',
    method: 'get',
    params: query
  })
}

/**
 * 删除操作日志
 * @param {string|number} operId - 操作日志ID
 * @returns {Promise} 返回删除结果的Promise对象
 */
export function delOperlog(operId) {
  return request({
    url: '/monitor/operlog/' + operId,
    method: 'delete'
  })
}

/**
 * 清空操作日志
 * @returns {Promise} 返回清空结果的Promise对象
 */
export function cleanOperlog() {
  return request({
    url: '/monitor/operlog/clean',
    method: 'delete'
  })
}

